package link.gpt.pojo;

import java.io.Serializable;

/**
 * student
 * @author
 */
public class Student implements Serializable {

   private Classes classes;

   public Classes getClasses() {
      return classes;
   }

   public void setClasses(Classes classes) {
      this.classes = classes;
   }

   public Student() {
   }

   public Student(Integer id, String name, Integer age, String gender, String telephone, String email, Integer classId) {
      this.id = id;
      this.name = name;
      this.age = age;
      this.gender = gender;
      this.telephone = telephone;
      this.email = email;
      this.classId = classId;
   }

   /**
    * 学生编号
    */
   private Integer id;

   /**
    * 学生姓名
    */
   private String name;

   /**
    * 学生年龄
    */
   private Integer age;

   /**
    * 性别
    */
   private String gender;

   /**
    * 手机号
    */
   private String telephone;

   /**
    * 邮箱
    */
   private String email;

   /**
    * 班级id
    */
   private Integer classId;

   private static final long serialVersionUID = 1L;

   public Integer getId() {
      return id;
   }

   public void setId(Integer id) {
      this.id = id;
   }

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }

   public Integer getAge() {
      return age;
   }

   public void setAge(Integer age) {
      this.age = age;
   }

   public String getGender() {
      return gender;
   }

   public void setGender(String gender) {
      this.gender = gender;
   }

   public String getTelephone() {
      return telephone;
   }

   public void setTelephone(String telephone) {
      this.telephone = telephone;
   }

   public String getEmail() {
      return email;
   }

   public void setEmail(String email) {
      this.email = email;
   }

   public Integer getClassId() {
      return classId;
   }

   public void setClassId(Integer classId) {
      this.classId = classId;
   }

   @Override
   public boolean equals(Object that) {
      if (this == that) {
         return true;
      }
      if (that == null) {
         return false;
      }
      if (getClass() != that.getClass()) {
         return false;
      }
      Student other = (Student) that;
      return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
              && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
              && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
              && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
              && (this.getTelephone() == null ? other.getTelephone() == null : this.getTelephone().equals(other.getTelephone()))
              && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
              && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()));
   }

   @Override
   public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
      result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
      result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
      result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
      result = prime * result + ((getTelephone() == null) ? 0 : getTelephone().hashCode());
      result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
      result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
      return result;
   }

   @Override
   public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append(getClass().getSimpleName());
      sb.append(" [");
      sb.append("Hash = ").append(hashCode());
      sb.append(", id=").append(id);
      sb.append(", name=").append(name);
      sb.append(", age=").append(age);
      sb.append(", gender=").append(gender);
      sb.append(", telephone=").append(telephone);
      sb.append(", email=").append(email);
      sb.append(", classId=").append(classId);
      sb.append(", serialVersionUID=").append(serialVersionUID);
      sb.append("]");
      return sb.toString();
   }
}